* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f0f0f0;
            color: #333;
            scroll-behavior: smooth;
        }

        header {
            background-color: #2c3e50;
            color: #fff;
            text-align: center;
            padding: 100px 20px; /* Increased padding for better appearance */
            position: relative; /* For absolute positioning of the animated background */
            overflow: hidden;  /* to contain the animation */
        }

        header .header-content {
            z-index: 1;
            position: relative; /* Ensure header content is above the animation */
        }


        header h1 {
            font-size: 2.5rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        header p {
            font-size: 1.2rem;
            font-weight: 300;
            margin-bottom: 0;
        }

        .typewriter {
            overflow: hidden; /* Ensures the content is not revealed until the animation */
            white-space: nowrap;
            margin: 0 auto;
            letter-spacing: .15em;
            animation:
                typing 3.5s steps(20, end) ,infinite,
                blink-caret .75s step-end, infinite;
        }

        @keyframes typing {
            from { width: 0 }
            to { width: 100% }
        }

        @keyframes blink-caret {
            from, to { border-color: transparent }
            50% { border-color: #fff; }
        }


        nav {
            background-color: #34495e;
            color: #fff;
            padding: 1rem 0;
            position: sticky; /* Make the navbar sticky */
            top: 0;
            z-index: 100;
        }

        nav .nav-container {
            display: flex;
            justify-content: center;
            gap: 20px;
        }


        nav a {
            color: #fff;
            text-decoration: none;
            font-weight: 400;
            font-size: 1.1rem;
            padding: 0.5rem 1rem;
            transition: color 0.3s;
        }

        nav a:hover {
            color: #f1c40f;
        }
        .active{
            color:#2ecc71
        }

        section {
            padding: 6rem 20px;
            text-align: center;
            max-width: 1200px; /* Added a max width for better readability */
            margin: 0 auto;
        }

        section h2 {
            font-size: 2.2rem;
            font-weight: 600;
            margin-bottom: 2rem;
            color: #2c3e50;
        }

        #about {
            background-color: #ecf0f1;
        }

        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            text-align: left;
            align-items: center; /* Vertically align items */
        }

        .about-text p {
            font-size: 1.1rem;
            line-height: 1.8;
            margin-bottom: 1rem;
        }

        .skill-bars {
            margin-top: 2rem;
        }

        .skill-bar {
            margin-bottom: 1.5rem;
        }

        .skill-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
        }

        .skill-info h4 {
            font-size: 1rem;
            font-weight: 500;
            color: #34495e;
        }

        .skill-info span {
            font-size: 1rem;
            color: #7f8c8d;
        }

        .skill-progress-bg {
            background-color: #bdc3c7;
            height: 0.5rem;
            border-radius: 0.5rem;
            position: relative;
            overflow: hidden; /* Ensure progress bar stays within rounded corners */
        }

        .skill-progress {
            background-color: #3498db;
            height: 0.5rem;
            border-radius: 0.5rem;
            width: 0;
            animation: fillSkill 2s ease-in-out forwards;
        }

        @keyframes fillSkill {
            from { width: 0; }
            to { width: var(--width); } /* Use a CSS variable */
        }

        /* Set the --width variable in your CSS, e.g.: */
        .skill-progress {
           --width: 95%; /* Example value, adjust as needed */
        }


        .resume-container {
            margin-top: 2rem;
        }

        .resume-container a {
            background-color: #3498db;
            color: #fff;
            padding: 0.75rem 1.5rem;
            text-decoration: none;
            border-radius: 0.5rem;
            font-size: 1.1rem;
            transition: background-color 0.3s;
        }

        .resume-container a:hover {
            background-color: #2980b9;
        }



        #projects {
            background-color: #fff;
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .card {
            background-color: #fff;
            padding: 1.5rem;
            border-radius: 0.5rem;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
            text-align: center;
        }

        .card:hover {
            transform: translateY(-10px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        }

        .card img {
            width: 100%;
            border-radius: 0.5rem;
            margin-bottom: 1rem;
            height: 200px;  /* added */
            object-fit: cover; /* added */
        }

        .card a {
            display: block;
            font-size: 1.2rem;
            font-weight: 600;
            color: #3498db;
            text-decoration: none;
            margin-bottom: 1rem;
            transition: color 0.3s;
        }

        .card a:hover {
            color: #2980b9;
        }

        .tech-tool {
            font-size: 0.9rem;
            color: #7f8c8d;
            margin-bottom: 0.5rem;
        }

        .technologies {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
        }

        .technology {
            background-color: #3498db;
            color: #fff;
            padding: 0.3rem 0.7rem;
            border-radius: 1rem;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .technology.ai-tech {
            background-color: #e74c3c;
        }


        #services {
            background-color: #ecf0f1;
        }

        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-top: 2rem;
        }

        .service-card {
            background-color: #fff;
            padding: 2rem;
            border-radius: 0.5rem;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
            text-align: center;
            display: flex; /* Added for equal height cards */
            flex-direction: column;
            justify-content: space-between; /* Distribute space between elements */
        }

         .service-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        }

        .service-icon {
            font-size: 2rem;
            color: #3498db;
            margin-bottom: 1rem;
        }
        .service-icon.ai-icon{
             color: #e74c3c;
        }

        .service-card h3 {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: #2c3e50;
        }

        .service-card p {
            font-size: 1.1rem;
            line-height: 1.7;
            margin-bottom: 1rem;
            color: #7f8c8d;
        }

        .service-features {
            list-style: none;
            margin-bottom: 1.5rem;
            text-align: left;
        }

        .service-features li {
            font-size: 1rem;
            margin-bottom: 0.5rem;
            color: #7f8c8d;
        }

        .service-features li i {
            margin-right: 0.5rem;
            color: #2ecc71;
        }

        .service-btn {
            background-color: #3498db;
            color: #fff;
            padding: 0.75rem 1.5rem;
            text-decoration: none;
            border-radius: 0.5rem;
            font-size: 1.1rem;
            transition: background-color 0.3s;
            display: inline-block; /* Make it an inline-block element */
            margin-top: auto; /* Push button to the bottom */
        }

        .service-btn:hover {
            background-color: #2980b9;
        }
        .service-btn.ai-btn{
             background-color: #e74c3c;
        }
        .service-btn.ai-btn:hover {
            background-color: #c0392b;
        }


        #contact {
            background-color: #fff;
            text-align: center;
        }

        #contact h2 {
             margin-bottom: 1rem;
        }

        .contact-form {
            margin-top: 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            max-width: 600px; /* Limit form width */
            margin: 2rem auto; /* Center the form */
        }

        .contact-form input,
        .contact-form select,
        .contact-form textarea{
            width: 100%;
            padding: 0.75rem;
            margin-bottom: 1.5rem;
            border: 1px solid #bdc3c7;
            border-radius: 0.5rem;
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        .contact-form input:focus,
        .contact-form textarea:focus {
            outline: none;
            border-color: #3498db;
        }

        .contact-form textarea {
            resize: vertical;
        }



        .contact-form button {
            background-color: #3498db;
            color: #fff;
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 0.5rem;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background-color 0.3s;
            width: fit-content; /* Adjust button width */
        }

        .contact-form button:hover {
            background-color: #2980b9;
        }


        footer {
            background-color: #2c3e50;
            color: #fff;
            text-align: center;
            padding: 1rem;
            margin-top: 4rem;
        }

        footer p{
            font-size: 1rem;
        }

         footer {
        background: var(--gradient-1);
        color: rgb(26, 16, 16);
        padding: 2rem 0;
        margin-top: 4rem;
        text-align: center;
        }

        .social-links {
            margin-top: 1rem;
        }

        .social-links a {
            color: rgb(134, 16, 16);
            font-size: 1.5rem;
            margin: 0 1rem;
            transition: all 0.3s ease;
        }

        .social-links a:hover {
            transform: translateY(-3px);
            color: var(--accent-color);
        }


       .animated-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.5;
            overflow: hidden; /* ADDED THIS LINE */
        }

        .animated-bg span {
            position: absolute;
            display: block;
            width: 20px;
            height: 20px;
            background: #3498db; /* Changed to a constant color */
            animation: move 25s linear infinite;
            bottom: -150px;
            border-radius: 50%;
            opacity: 0.1;
        }

        .animated-bg span:nth-child(1) {
            left: 25%;
            width: 80px;
            height: 80px;
            animation-delay: 0s;
        }

        .animated-bg span:nth-child(2) {
            left: 10%;
            width: 20px;
            height: 20px;
            animation-delay: 2s;
            animation-duration: 12s;
        }

        .animated-bg span:nth-child(3) {
            left: 70%;
            width: 20px;
            height: 20px;
            animation-delay: 4s;
        }

        .animated-bg span:nth-child(4) {
            left: 40%;
            width: 60px;
            height: 60px;
            animation-delay: 0s;
            animation-duration: 18s;
        }

        .animated-bg span:nth-child(5) {
            left: 65%;
            width: 20px;
            height: 20px;
            animation-delay: 0s;
        }

        @keyframes move {
            0% {
                transform: translateY(0) rotate(0deg);
                opacity: 1;
                border-radius: 0;
            }
            100% {
                transform: translateY(-1000px) rotate(720deg);
                opacity: 0;
                border-radius: 50%;
            }
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .about-grid {
                grid-template-columns: 1fr;
            }
             header{
                padding: 80px 20px;
            }
            header h1{
                font-size: 2rem;
            }
            header p{
                font-size: 1rem;
            }
            nav .nav-container {
                flex-direction: column;
                gap: 10px;
            }
            nav a{
                font-size: 1rem;
            }
            section {
                padding: 4rem 15px;
            }
             section h2{
                font-size: 2rem;
            }
            .contact-form {
                width: 90%;
            }
            .projects-grid, .services-grid{
                grid-template-columns: 1fr;
            }
        }
         @media (max-width: 480px) {
            header{
                padding: 60px 10px;
            }
            header h1{
                font-size: 1.75rem;
            }
            header p{
                font-size: 0.9rem;
            }
            nav a{
                font-size: 0.9rem;
            }
            section {
                padding: 3rem 10px;
            }
             section h2{
                font-size: 1.75rem;
            }
            .about-text p{
                font-size: 1rem;
            }

        }